h1. Welcome to RubyWorks

h1. How to use it?

h2. Setup your Yum configuration

* Create <code>/etc/yum.repos.d/rubyworks.repo</code> file with content as following
  
<pre>
[rubyworks]
name=RubyWorks
baseurl=http://repo.thoughtworkers.org/RPMS/
enabled=1
gpgcheck=0  
</pre>

* Exec <code>yum update</code> in console (you may need sudo that)

h2. Install RubyWorks

  * Exec <code>yum install rubyworks</code> in console (you may need sudo that). Following RPM packages will be installed:

    * ruby (requires: openssl, zlib, glibc >= 2.4)

    * rubygems (requires: ruby >= 1.8.5)

    * haproxy (requires: httpd >= 2.2.3)

    * monit

    * mongrel (requires: ruby >= 1.8.5, rubygems >= 0.9.2)

    * rubyworks-common (requires: ruby >= 1.8.5, rubygems >= 0.9.2, mongrel >= 1.0.1, haproxy >= 1.3.8, monit)

    * rails-control-center (requires: rubyworks-common)

    * rubyworks (requires: rails-control-center)

  * After installation, you'll have a <code>/usr/local/lib/rails-control-center</code> directory.
  
h2. Create RPM for your Rails application

(Refer to "Create RPM For Your Rails Application":http://gigix.thoughtworkers.org/articles/2007/04/28/create-rpm-for-your-rails-application .)

h2. Install your Rails application in RubyWorks

  * Install the RPM of your application. By default it will be installed to <code>/usr/local/lib/rails-apps/#{app_name}</code>.
  
  * Create a container for your application:
  
  	* <code>cd /usr/local/lib/rails-apps/#{app_name}</code>
  	
  	* <code>rake create_container</code>
  * Now you should be able to start|stop your application with <code>rake start_container|stop_container</code>.